package org.dfg.corejava.designPattern.thread.sync;

import java.nio.ByteBuffer;

public class SyncTestWriter extends Thread {
	private ByteBuffer bb;

	public SyncTestWriter(ByteBuffer bb) {
		this.bb = bb;
	}

	@Override
	public void run() {// 模拟写，假设一直未释放
		synchronized (bb) {
			int i = 0;
			while (i < 1) {
			}
		}
		System.out.println("write end");
	}
}
